:host(:not([hidden])) {
	/* Well known worakround to allow shrinking inside flex containers
	 * and shrinking is needed so the texts trucnate properly.
	 */
	min-width: 1px;
}

/* Selected (active) step */
:host([selected]:not([disabled])) .ui5-wiz-step-icon-circle {
	background: var(--_ui5_wiz_tab_selected_bg);
}

:host([selected]:not([disabled])) .ui5-wiz-step-title-text {
	color: var(--sapContent_Selected_ForegroundColor);
}

:host([selected]:not([disabled])) .ui5-wiz-step-icon-circle::after {
	content: "";
	position: absolute;
	border-bottom: 0.25rem solid var(--_ui5_wiz_tab_selection_line);
	border-top-left-radius: 0.1875rem;
	border-top-right-radius: 0.1875rem;
	left: 0;
	right: 0;
	bottom: -1rem;
}

:host([selected]:not([disabled])) .ui5-wiz-step-icon {
	color: var(--sapContent_ContrastIconColor);
}

:host([selected]:not([disabled])) .ui5-wiz-step-number {
	color: var(--sapContent_ContrastTextColor);
}

/* Disabled step */
:host([disabled]) .ui5-wiz-step-icon-circle {
	border-color: var(--sapList_BorderColor);
	background: var(--sapObjectHeader_Background);
}

:host([disabled]) .ui5-wiz-step-title-text {
	color: var(--sapContent_LabelColor);
}

:host([disabled]) .ui5-wiz-step-icon {
	color: var(--sapContent_LabelColor);
}

:host([disabled]) .ui5-wiz-step-number {
	color: var(--sapContent_LabelColor);
}

.ui5-wiz-step-root {
	display: flex;
	align-items: center;
	flex-direction: row;
	font-size: var(--sapFontSize);
	font-family: var(--sapFontFamily);
	outline: none;
}

.ui5-wiz-step-main {
	max-width: 100%;
	text-align: center;
	white-space: nowrap;
}

:host(:not([disabled])) .ui5-wiz-step-main {
	cursor: pointer;
}

.ui5-wiz-step-root:focus .ui5-wiz-step-main {
	outline: var(--_ui5_wiz_tab_focus_outline);
	outline-offset: 1px;
	border-radius: var(--_ui5_wiz_tab_focus_border_radius);
}

/* Icon */
.ui5-wiz-step-icon-circle {
	display: inline-flex;
	box-sizing: border-box;
	vertical-align: middle;
	justify-content: center;
	align-items: center;
	text-align: center;
	width: 2rem;
	height: 2rem;
	margin: 0 0.1875rem;
	line-height: 1.875rem;
	border-radius: 50%;
	background: var(--sapObjectHeader_Background);
	border: var(--_ui5_wiz_tab_border);
	position: relative;
}

.ui5-wiz-step-icon {
	width: 1rem;
	height: 1rem;
	color: var(--_ui5_wiz_tab_icon_color);
	pointer-events: none;
}

/* Texts when no icon set */
.ui5-wiz-step-number {
	color: var(--_ui5_wiz_tab_icon_color);
}

/* Heading and Subheading */
.ui5-wiz-step-texts {
	display: inline-block;
	max-width: calc(100% - 3rem);
	vertical-align: middle;
	text-align: left;
	padding: 0 0.5rem 0 0.1875rem;
	max-height: 3rem;
	overflow: hidden;
	background: var(--sapObjectHeader_Background);
}

.ui5-wiz-step-title-text,
.ui5-wiz-step-subtitle-text {
	color: var(--_ui5_wiz_tab_title_color);
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

.ui5-wiz-step-title-text {
	font-family: var(--_ui5_wiz_tab_title_font_family);
	white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

:host([subtitle-text]:not([subtitle-text=""])) .ui5-wiz-step-title-text {
    -webkit-line-clamp: 1;
}

:host([data-ui5-wizard-expanded-tab-prev="true"]) .ui5-wiz-step-title-text,
:host([data-ui5-wizard-expanded-tab-prev="true"]) .ui5-wiz-step-subtitle-text,
:host([data-ui5-wizard-expanded-tab="false"]) .ui5-wiz-step-texts,
:host([data-ui5-wizard-expanded-tab="false"]) .ui5-wiz-step-title-text,
:host([data-ui5-wizard-expanded-tab="false"]) .ui5-wiz-step-subtitle-text {
	display: none;
}

.ui5-wiz-step-subtitle-text {
	margin-top: 0.125rem;
	font-family: var(--sapFontFamily);
	color: var(--sapContent_LabelColor);
	font-size: var(--sapFontSmallSize);
}

/* Separator */
.ui5-wiz-step-hr {
	display: inline-block;
	border-bottom-color: var(--sapList_BorderColor);
	border-bottom-width: 1px;
	border-bottom-style: solid;
	height: 1px;
	flex-grow: 1;
	margin-right: .25rem;
	min-width: .5rem;
}

:host([active-separator]) .ui5-wiz-step-hr {
	border-bottom-color: var(--_ui5_wiz_tab_active_separator_color)
}

:host([branching-separator]) .ui5-wiz-step-hr {
	border-bottom-style: dashed;
}

:host([data-ui5-wizard-expanded-tab="false"]) .ui5-wiz-step-root {
	display: inline;
	position: absolute;
	top: 0;
}

:host([data-ui5-wizard-after-current-tab="true"]) .ui5-wiz-step-root {
	right: 0;
}

:host([data-ui5-wizard-expanded-tab="false"]) .ui5-wiz-step-hr {
	display: none;
}
